//
//  ZNewClubCell.m
//  WeClubs
//
//  Created by Zed Link on 20/4/2017.
//  Copyright © 2017 Zed. All rights reserved.
//

#import "ZNewClubCell.h"
#import <SDWebImage/UIImageView+WebCache.h>
@interface ZNewClubCell ()

@property (weak, nonatomic) IBOutlet UIImageView *logoImgView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *memberLabel;

@end

@implementation ZNewClubCell

- (void)zSetupCell
{
    [super zSetupCell];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.separatorInset = UIEdgeInsetsMake(0, 52, 0, 0);
    [self.contentView setBackgroundColor:NAVBAR_BG_COLOR];
    
    [self.logoImgView zCornerDeal:20];
    
}

- (void)setMeberModel:(ZMemberModel *)meberModel{

    if (meberModel == nil) return;
    _meberModel = meberModel;
    
    [self.logoImgView sd_setImageWithURL:[NSURL URLWithString:meberModel.avatar_url] placeholderImage:defaultIcon];
    self.nameLabel.text = meberModel.club_name;
    self.memberLabel.text =[NSString stringWithFormat:@"成员:%zd",meberModel.member_count];
        


}

@end
